<template>
	<view class="noticeWarp">
		<view class="noticeItem" v-for="(item,index) in 3" :key="index">
			<view class="itemAvatar">
				<image src="../../../static/jzqIcon/user1.png"></image>
			</view>
			<view class="noticeContent">
				<view class="noticeTitle">
					<text class="user">Kuder</text>
					<text>回复了你</text>
					<text class="titleContent">Kuder测评回复了你：看书也是...</text>
				</view>
				<view class="noticeTime">
					<text>刚刚</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		request
	} from "../../../util/api";
	import {
		TOAST
	} from "../../../util/util";
	export default {
		data() {
			return {
				userId:''
			};
		},
		onLoad() {
			this.getMessageData()
		},
		methods:{
			getMessageData(){
				let userId=uni.getStorageSync("userId",userId)
				console.log(userId)
				request({
					url:"/system/CompassDiaryMsg/" + userId,
					method:"get",
					data:{
						id:userId
					}
				}).then(res=>{
					console.log(res)
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.noticeWarp{
	.noticeItem{
		display: flex;
		align-items: center;
		border-bottom: 1rpx solid #C0C0C0;
		padding: 20rpx;
		.itemAvatar{
			margin-right: 20rpx;
			image{
				width: 80rpx;
				height: 80rpx;
			}
		}
		.noticeContent{
			.noticeTitle{
				.user{
					font-size: 28rpx;
					font-weight: bold;
				}
				.titleContent{
					width: 200rpx;
					overflow: hidden;
					text-overflow:ellipsis;    
					whitewhite-space: nowrap;
				}
			}
			.noticeTime{
				font-size: 24rpx;
				color: #C0C0C0;
			}
		}
	}
}
</style>
